#ifndef __CMYHERO_DEF_H
#define __CMYHERO_DEF_H

#define DUMMY_VAL		-1

#define DIR_LEFT		0
#define DIR_RIGHT		1
#define DIR_UP			2
#define DIR_DOWN		3


#define STATE_LOAD		0
#define STATE_READY		1
#define STATE_PLAY		2
#define STATE_DIE		3
#define STATE_CONTINUE	4
#define STATE_GAMEOVER	5
#define STATE_CLEAR		6

#define TILE_WIDTH	16
#define TILE_HEIGHT	16
#define MAP_ROW_CNT	26
#define MAP_COL_CNT	26

#define OBJ_TYPE_PLAYER	0
#define OBJ_TYPE_ENEMY	1
#define OBJ_TYPE_BULLET	2
#define OBJ_TYPE_ITEM	3
#define OBJ_TYPE_FLAG	4

#define TILE_BOUND		-1
#define TILE_BG			0
#define TILE_BRICK		1
#define TILE_STEEL		2
#define TILE_TREE		3
#define TILE_WATER1		4
#define TILE_ICE		5
#define TILE_WATER2		6
#define TILE_FORTRESS	7

#define MAX_WATER_TILES		26*26
#define MAX_TREE_TILES		26*26
#define WATER_ANI_DURATION	400

#define PLAYER_ST_IDLE		0
#define PLAYER_ST_MOVE		1
#define PLAYER_ST_DAMAGE	3
#define PLAYER_ST_SPAWN		4

#define PLAYER_SHIELD_DURATION	3000.0
#define PLAYER_TANK_SPEED	4
#define PLAYER_DEF_VELOCITY	80.0f // pixels per sec

#define ENEMY_ST_IDLE	0
#define ENEMY_ST_MOVE	1
#define ENEMY_ST_DAMAGE	3
#define ENEMY_ST_SPAWN	4

#define ENEMY_TANK_SPEED	4
#define MAX_ETANK_TYPES	4
#define ETANK_BASIC		0
#define ETANK_FAST		1
#define ETANK_POWER		2
#define ETANK_ARMOR		3

#define ITEM_ST_NORMAL	0
#define ITEM_ST_FADEOUT	1

#define ITEM_TANK	0
#define ITEM_CLOCK	1
#define ITEM_SHOVEL	2
#define ITEM_BOMB	3
#define ITEM_STAR	4
#define ITEM_SHIELD	5
#define ITEM_LIVE_TIME	300000.0 // 10 sec

#define MAX_ITEM_USING	5

#define ITEM_CLOCK_TIME		9000.0
#define ITEM_SHOVEL_TIME	12000.0
#define ITEM_SHIELD_TIME	8000.0

#define BULLET_MARGIN_LR	2
#define BULLET_MARGIN_FB	2
#define TANK_ITEM_MARGIN	2

#define STAGE_MAX_ETANK_SPAWN	20
#define ENEMY_SPAWN_PERIOD		3000.0
#define MAX_ENENMY_ON_MAP		4
#define MAX_STAGE		35

#define BULLET_DX		4.0
#define BULLET_DY		4.0
#define BULLET_DEF_SPEED	4.0
#define BULLET_ST_MOVE		0
#define BULLET_ST_EXPLODE	1

#define DEF_PLAYER_LIFE	3
#define PLAYER_BULLET_INTERVAL	300.0
#define ENEMY_BULLET_INTERVAL	1500.0
#define PLAYER_BULLET_DX	10.0

#define PLAYER_BULLET_LEV_DEF		0
#define PLAYER_BULLET_LEV_SPEEDUP	1
#define PLAYER_BULLET_LEV_PLUS		2
#define PLAYER_BULLET_LEV_POWERUP	3
#define PLAYER_BULLET_LEV_MAX		3

#define FORTRESS_TILE_ROW_MIN	24
#define FORTRESS_TILE_ROW_MAX	25
#define FORTRESS_TILE_COL_MIN	12
#define FORTRESS_TILE_COL_MAX	13

#define FORTRESS_BLOCK_CNT	8

#define JOYPAD_BTN_DIRECTION	0
#define JOYPAD_BTN_NORMAL		1
#define JOYPAD_BTN_NUM	2
#define JOYPAD_BTN_A	0
#define JOYPAD_BTN_B	1

#define MAX_GAME_KEYS	6
#define GAME_KEY_LEFT	0
#define GAME_KEY_RIGHT	1
#define GAME_KEY_UP		2
#define GAME_KEY_DOWN	3
#define GAME_KEY_A		4
#define GAME_KEY_B		5

#endif // __CMYHERO_DEF_H